package com.pg.agent.engine.client.message;

import com.pg.agent.engine.client.dto.ComponentInParamVO;
import com.pg.agent.engine.client.model.llm.CallLog;
import lombok.Data;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Data
public class OutPutMessage {

    /**
     * 会话ID
     */
    private String sessionId;

    /**
     * 会话次数
     */
    private Integer sessionNum;

    /**
     * 响应结果
     */
    private String response;

    /**
     * 响应结果
     */
    private String content;

    /**
     * 调用时长
     */
    private long timeLong;

    /**
     * 调用SOP开始时间
     */
    private Date callStartTime = new Date();

    /**
     * 调用SOP结束时间
     */
    private Date callEndTime;

    /**
     * sopID
     */
    private long sopId;

    /**
     * 图片集合 格式[{"id":"","type":1,"name":xxx,"url":xxx,"desc":xxx,"otherInfo":xxx}]
     */
    private String imageList;

    /**
     * 标签集合
     */
    private String labelList;

    /**
     * 气泡集合 格式[{"id":"","bubbleInfo":1,"type":xxx,"key":xxx,"url":xxx,"agentName":xxx,"stateName":"xxx"}]
     */
    private String bubbleList;

    /**
     * 文件集合 格式[{"id","type":1,"name":xxx,"url":xxx,"desc":xxx,"otherInfo":xxx}]
     */
    private String fileList;

    /**
     * 本次会话执行，调用大模型日志
     */
    private List<CallLog> callLogList = new ArrayList<>();

    /**
     * saas应用id
     */
    private Long saasAppId;

    /**
     * 类型1.直达，2.聚合
     */
    private Integer exeType;

    /**
     * 数据ID，每条数据唯一标识
     */
    private String dataId;

    /**
     * sop入参，key:组件id，value：参数详情
     */
    private List<ComponentInParamVO> componentInParam;

    /**
     * agent返回的数据
     */
    private String agentResponse;

    private boolean first = true;


    public OutPutMessage(String sessionId, Integer sessionNum) {
        this.sessionId = sessionId;
        this.sessionNum = sessionNum;
        this.dataId = sessionId + "-" + sessionNum;
    }
    public OutPutMessage(){

    }

}
